import { DagreLayout } from '@antv/layout'

export function runLayout(nodes: any[], edges: any[]) {
  const dagre = new DagreLayout({
    type: 'dagre',
    rankdir: 'LR', // 小写！
    nodesep: 60,
    ranksep: 80,
  })
  return dagre.layout({ nodes, edges })
}
